const option={
  tooltip: {
    trigger: 'item',
    formatter: function (params) {
        return params.name + (params.value[2]&&params.value[2]!=10.1?' : ' + params.value[2]:'');
    },
  },
  geo: {
    type: 'map',
    show: true,
    map: 'china',
    zoom:1.2,
    aspectScale: 0.8, //长宽比
    scaleLimit:{                        
      min:1.2,                                                   
    },
    label: {
      normal: {
        show: false
      },
      emphasis: {
        show: false,
      }
    },
    roam: true,
    itemStyle: {
      areaColor: {
        type: 'linear',
        x: 30,
        y: 0,
        x2: 320,
        y2: 320,
        colorStops: [{
            offset: 0, color: '#00A3F8'
        }, {
            offset: 1, color: '#071442'
        }],
        global: true
      },
      borderColor: 'rgba(255,176,83,1)',
      borderWidth: 1,
      emphasis: {
        show: false,
        areaColor: ' '
      }
    },
    // 这里是重点！！！
    regions: [
      {
        name: "南海诸岛",
        itemStyle: {
          // 隐藏地图
          normal: {
            opacity: 0, // 为 0 时不绘制该图形
          }
        },
        label: {
          show: false // 隐藏文字
        }
      }
    ],
  },
  series: [{
    name: '数量',
    type: 'effectScatter',
    coordinateSystem: 'geo',
    data: '',
    showEffectOn: 'render',
    rippleEffect: {
      period:1, 
      scale:2,
      brushType: 'stroke'
    },
    hoverAnimation: true,
    label: {
      emphasis: {
        show: true,
        areaColor: null
      }
    },
    itemStyle: {
      normal: {
          color: 'red',
          shadowBlur: 1,
          shadowColor: 'red'
      }
    }
  }]
}

const option1={
  tooltip : {
    trigger: 'item',
    formatter: function (params) {
      if(params.data){
        return params.data.name + '：<br>' +params.data.color
      }else{
        return params.name
      }
    },
    backgroundColor : 'rgba(255,0,0,0.7)'
  },
  visualMap: {
    min: 0,
    max: 1,
    realtime: false,
    calculable: true,
    show: false,
    inRange: {
        color: ['#0360A2', '#F64F44']
    }
  },
  series: [{
    name: '数量',
    type: 'map',
    // coordinateSystem: 'geo',
    data: '',
    zoom:1.2,
    aspectScale: 0.8, //长宽比
    scaleLimit:{                        
      min:1.2,                                                   
    },
    showEffectOn: 'render',
    rippleEffect: {
      period:1, 
      scale:2,
      brushType: 'stroke'
    },
    hoverAnimation: true,
    label: {
			// show: true, // 隐藏文字
      emphasis: {
        show: false,
        areaColor: null
      }
    },
    itemStyle: {
      // areaColor: {
      //   type: 'linear',
      //   x: 30,
      //   y: 0,
      //   x2: 520,
      //   y2: 620,
      //   colorStops: [{
      //       offset: 0, color: '#00A3F8'
      //   }, {
      //       offset: 1, color: '#071442'
      //   }],
      //   global: true
      // },
      areaColor:'#0360A2',
      borderColor: 'rgba(255,176,83,1)',
      borderWidth: 1,
      emphasis: {
        show: false,
        areaColor: '#ff9933'
      }
    },
    regions: [
      {
        name: "南海诸岛",
        itemStyle: {
          // 隐藏地图
          normal: {
            opacity: 0, // 为 0 时不绘制该图形
          }
        },
        label: {
          show: false // 隐藏文字
        }
      }
    ],
  }]
}
const option2={
  tooltip : {
    trigger: 'item',
    // formatter: function (params) {
    //   if(params.data){
    //     return params.data.name + '：<br>' +params.data.color
    //   }else{
    //     return params.name
    //   }
    // },
    backgroundColor : 'rgba(255,0,0,0.7)'
  },
  visualMap: {
    min: 0,
    max: 1,
    realtime: false,
    calculable: true,
    show: false,
    inRange: {
        color: ['#0360A2','#ff9933', '#F64F44']
    }
  },
  series: [{
    name: '数量',
    type: 'map',
    // coordinateSystem: 'geo',
    data: '',
    zoom:1.2,
    aspectScale: 0.8, //长宽比
    scaleLimit:{                        
      min:1.2,                                                   
    },
    showEffectOn: 'render',
    rippleEffect: {
      period:1, 
      scale:2,
      brushType: 'stroke'
    },
    hoverAnimation: true,
    label: {
      emphasis: {
        show: false,
        areaColor: null
      }
    },
    itemStyle: {
      // areaColor: {
      //   type: 'linear',
      //   x: 30,
      //   y: 0,
      //   x2: 520,
      //   y2: 620,
      //   colorStops: [{
      //       offset: 0, color: '#00A3F8'
      //   }, {
      //       offset: 1, color: '#071442'
      //   }],
      //   global: true
      // },
      areaColor:'#0360A2',
      borderColor: 'rgba(255,176,83,1)',
      borderWidth: 1,
      emphasis: {
        show: false,
        areaColor: '#ff9933'
      }
    },
    regions: [
      {
        name: "南海诸岛",
        itemStyle: {
          // 隐藏地图
          normal: {
            opacity: 0, // 为 0 时不绘制该图形
          }
        },
        label: {
          show: false // 隐藏文字
        }
      }
    ],
  }]
}

const option3={
  tooltip : {
    trigger: 'item',
    formatter: function (params) {
			console.log(params)
      if(params.data){
        return params.data.name + '：<br>' +params.data.value[2]
      }else{
        return params.name
      }
    },
    backgroundColor : 'rgba(255,0,0,0.7)'
  },
  visualMap: {
    min: 0,
    max: 1,
    realtime: false,
    calculable: true,
    show: false,
    inRange: {
        color: ['#0360A2','#ff9933', '#F64F44']
    }
  },
  series: [{
    name: '数量',
    type: 'map',
    // coordinateSystem: 'geo',
    data: '',
    zoom:1.2,
    aspectScale: 0.8, //长宽比
    scaleLimit:{                        
      min:1.2,                                                   
    },
    showEffectOn: 'render',
    rippleEffect: {
      period:1, 
      scale:2,
      brushType: 'stroke'
    },
    hoverAnimation: true,
    label: {
			normal: {
				formatter: function(param){
					return  param.data.value[2]
				},
				position: 'right',
				color:'#fff',
				show: true
			},
      emphasis: {
        show: false,
        areaColor: null
      }
    },
    itemStyle: {
      // areaColor: {
      //   type: 'linear',
      //   x: 30,
      //   y: 0,
      //   x2: 520,
      //   y2: 620,
      //   colorStops: [{
      //       offset: 0, color: '#00A3F8'
      //   }, {
      //       offset: 1, color: '#071442'
      //   }],
      //   global: true
      // },
      areaColor:'#0360A2',
      borderColor: 'rgba(255,176,83,1)',
      borderWidth: 1,
      emphasis: {
        show: false,
        areaColor: '#ff9933'
      }
    },
    regions: [
      {
        name: "南海诸岛",
        itemStyle: {
          // 隐藏地图
          normal: {
            opacity: 0, // 为 0 时不绘制该图形
          }
        },
        label: {
          show: false // 隐藏文字
        }
      }
    ],
  }]
}

const option4={
  tooltip : {
    trigger: 'item',
    formatter: function (params) {
			console.log(params)
      if(params.data){
        return params.data.name + '：' +params.data.value[2]
      }else{
        return params.name
      }
    },
    backgroundColor : 'rgba(255,0,0,0.7)',
		textStyle:{
			color:'#fff'
		}
  },
  visualMap: {
    min: 0,
    max: 1,
    realtime: false,
    calculable: true,
    show: true,
    left:'right',
    textStyle: {
      color:'#f93'
    },
    inRange: {
        color: ['#0360A2','#ff9933', '#F64F44']
    }
  },
  series: [{
    name: '数量',
    type: 'map',
    // coordinateSystem: 'geo',
    data: '',
    zoom:1.2,
    aspectScale: 0.8, //长宽比
    scaleLimit:{                        
      min:1.2,                                                   
    },
    showEffectOn: 'render',
    rippleEffect: {
      period:1, 
      scale:2,
      brushType: 'stroke'
    },
    hoverAnimation: true,
    label: {
			normal: {
				formatter: function(param){
					if(param.data){
						return  param.data.value[2]
					}else{
						return ''
					}
				},
				position: 'right',
				color:'#fff',
				show: false
			},
      emphasis: {
        show: false,
        areaColor: null
      }
    },
    itemStyle: {
      // areaColor: {
      //   type: 'linear',
      //   x: 30,
      //   y: 0,
      //   x2: 520,
      //   y2: 620,
      //   colorStops: [{
      //       offset: 0, color: '#00A3F8'
      //   }, {
      //       offset: 1, color: '#071442'
      //   }],
      //   global: true
      // },
      areaColor:'#0360A2',
      borderColor: 'rgba(255,176,83,1)',
      borderWidth: 1,
      emphasis: {
        show: false,
        areaColor: '#ff9933'
      }
    },
    regions: [
      {
        name: "南海诸岛",
        itemStyle: {
          // 隐藏地图
          normal: {
            opacity: 0, // 为 0 时不绘制该图形
          }
        },
        label: {
          show: false // 隐藏文字
        }
      }
    ],
  }]
}
export {
  option,
  option1,
  option2,
  option3,
  option4
}